#!/usr/bin/env python
# -*- coding:utf-8 -*-

pts = [[1751.0066,  706.2925],
       [2655.1142,  796.8993],
       [3430.4045,  541.7697],
       [4508.6542,  677.6798],
       [4921.3472, 1385.8431],
       [4756.7471, 2196.5351],
       [4157.9845, 2010.5528],
       [4229.5498, 1295.2364],
       [3988.6134,  985.2659],
       [3590.2335, 1061.5663],
       [3029.6390, 1292.8520],
       [2581.1635, 1147.4043],
       [2049.1951, 1209.3984],
       [2149.3865, 1762.5765],
       [3144.1435, 2079.7001],
       [3456.6450, 2547.0402],
       [2807.7868, 2618.5718],
       [1917.9922, 2520.8119],
       [1646.0442, 1776.8828],
       [1591.1775, 1152.1731],
       ]

pts.extend([[1798.7167  ,947.1157],
            [3001.5508  ,948.0336],
            [4410.8484  ,854.1246],])

print('%s 2 0 0' % len(pts))
for i, pt in enumerate(pts):
    print('%s %s %s' % (i, pt[0], pt[1]))
    
print('%s 0' % len(pts))
for i in range(1, len(pts)):
    print('%s %s %s' % (i, i, i + 1))
i = len(pts)
print('%s %s %s' % (i, i, 1))
    